import requests
import json

url = "https://localhost/login"

# 登录的伪装数据
data = {
    "username": "admin",
    "password": "password"
}

# 发起 HTTPS 请求
response = requests.post(url, json=data, verify=False)  # verify=False 是为了跳过自签名证书验证

if response.status_code == 200:
    print("Login successful!")
else:
    print("Login failed: ", response.json())
